Udacity st095 Statistics Notebook

This course, classroom can be divided into describe (classroom) and inference statistics.
wiki
Completed in 2017/08/07

Orientation!

Welcome

Intro

Quiz: MnMs

Quiz: Definitely blue

Problem Sets

Quiz: Forums

Quiz: Instructor Notes

My Drive

Quiz: Practice with Spreadsheets

Quiz: Calculate sums

Course Wiki

You can get to the course wiki by clicking “Materials” or following this link.

Intro to Research Methods

Lauren's Intro Video

Quiz: Believe Results

Quiz: Measure Memory

Define Constructs

BBC Memory Test

Memory Test Description

Here is a brief description of how the test worked, to help you follow the rest of the lesson. The test consisted of three parts:

Users were shown 12 photos in the first part.
Users were shown another 12 photos in the second part.
Users were shown 48 photos in the third part and asked if they saw each photo
in the first part, the second part, or neither.

After the test, users were given two scores:

A “Recognition score”, calculated as the percentage of times they correctly identified whether they saw the face at all, regardless of which part the face was from.
A “Temporal memory score”, calculated as the percentage of recognized faces that were identified with the correct part (part 1 or part 2).

Users were advised to take a 5 minute break between each part of the test.

BBC Scores

Google Account

Quiz: BBC Measurement

Operational Definition

Quiz: Constructs

Quiz: Operational Definitions

Data

Quiz: Sleep and Memory

Quiz: Influence Memory

Quiz: Control for Time of Day

lurking variables
extraneous factor

Quiz: Same Scores

Population parameters (such as mu, or μ) are values that describe the entire population. Sample statistics (such as X-bar, or $\bar{x}$​​ ) are values that describe our sample; we use statistics to estimate the population parameters. Estimates are our best guesses for the population parameters. So, for example, we would use X-bar to estimate mu.

Quiz: Sample Average

Quiz: Better Sample

Randomness

Quiz: Visualize Relationship

Quiz: True or Not?

Golden Arches Theory

McDonald's

Quiz: World Peace

Causal Inference

Quiz: Benefits of Surveys

Quiz: Downsides of Surveys

Quiz: Placebo

Quiz: Blind

Quiz: Double Blind

Quiz: Controlled Factors

Random Assignment

Quiz: Control for What?

Quiz: Katie's Hand

Click this link to access the data: Height and hand length

Copy and paste the data into your own spreadsheet to create the scatterplot. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Quiz: Draw Conclusions

Problem Set 1: Intro to statistical research methods

Quiz: 1. All California Residents

Quiz: 2. Sleepy College Students

Quiz: 3. Not Enough Sleep…?

Quiz: 4. Characteristic of a Sample

Quiz: 5. Freshman 15

Quiz: 6. Characteristic of a Population

Quiz: 7. Sample Approximates Population

Quiz: 8. SAT Scores

Quiz: 9. Survey to Friends

Quiz: 10. Which Are Constructs?

Quiz: 11. Which Are Not Constructs?

Quiz: 12. Define Operational Definition

Quiz: 13. Research Studies

Quiz: 14. Variables

Quiz: 15. Variable Relationships

Quiz: 16. Which Are Hypotheses?

Quiz: 17. Lurking Around

Quiz: 18. Symbols = Fun Fun Fun!

Quiz: 19. n

Quiz: 20. Which Are True?

Quiz: 21. Random Sample

Quiz: 22. Convenience Samples

Quiz: 23. Sample vs. Population

Quiz: 24. Classical Music

Quiz: 25. Caffeine

Quiz: 26. Video Games

Quiz: 27. English Teaching

Quiz: 28. Reading Score

Quiz: 29. Extreme Temperature

Quiz: 30. Teaching Method

Quiz: 31. Reading Scores

Quiz: 32. Which Is Better?

Quiz: 33. All Kinds of Variables

Quiz: 34. Landmines

Quiz: 35. Landmines

Quiz: 36. Student Satisfaction

Quiz: 37. Insomnia

Quiz: 38. Insomnia

Quiz: 39. SAD

Quiz: 40. Random Assignment

Quiz: 41. Placebo Control Condition

Quiz: 42. Why Placebo?

Quiz: 43. Measuring Constructs

Quiz: 44. Participants

Quiz: 45. What Proportion?

Quiz: 46. Blind Studies

Quiz: 47. Causality?

Quiz: 48. Depression

Quiz: 49. Depression

Quiz: 50. Depression

Conclusion

construct
opertaional definition
independent variable
dependent variable
extraneous or lurking variable
experimental study - casual conclusion
observational study

Visualizing Data

Quiz: Where Students Are From

Quiz: Frequency

Quiz: US, China, Pakistan

Quiz: Relative Frequency

Quiz: Range of Proportions

Quiz: Sum Relative Frequencies

Quiz: Proportion from Countries

Quiz: Convert to Percentage

Quiz: Range Percentages

Quiz: Continents

Quiz: Number of Rows

interval = bin = bucket

Quiz: Bin Size

Visualizing Data

Quiz: Histogram

Different Bin Sizes

Click this link to play around with the histogram applet! (You may need to install the Java plug-in.) Interactivate Histogram Applet

Udacity Student Ages Data: Make sure you have one number per line for the applet.

Quiz: Smaller Bin

Quiz: Find Bin Size

Quiz: Most Frequent Age

Quiz: Proportion over 60

Quiz: Percentage Under 60

Quiz: Younger than 20

Quiz: Continent Graph

Quiz: Difference Between Graphs

histogram: bin x-axis: numerical/quantitative
bar: x-axis: categorical/qualitative

Quiz: Biased Graphs

Changing Bin Size

Quiz: Interpret Histogram

Quiz: Skewed Distribution

Problem Set 2: Visualizing data

Quiz: 1. Blood Types

The Σ symbol means the total sum. It is the Greek letter capital sigma. f stands for frequency (count), p stands for proportion.

The Σ symbol means the total sum. It is the Greek letter capital sigma. f stands for frequency (count), p stands for proportion.

Enter each answer as a number without any special characters, including % signs. Enter proportions as decimals.

The Σ symbol means the total sum. It is the Greek letter capital sigma.

Quiz: 2. Rare Blood

Quiz: 3. Common Blood

Quiz: 4. Type A

Quiz: 5. Guesstimate

Quiz: 6. Analyze Stuff

Quiz: 7. Ode to n

Quiz: 8. Calculate Percentages

Quiz: 9. Common Decade

Quiz: 10. How Old?

Quiz: 11. Really Old!

Quiz: 12. Birth Year Histogram

Quiz: 13. Most Common Bin

Quiz: 14. When Most Were Born

Quiz: 15. Type of Data

Quiz: 16. Heights of Bars

Quiz: 17. Which Region?

Quiz: 18. Calculate Bin Size

Quiz: 19. How to Find n

Quiz: 20. How to Analyze Shape

Quiz: 21. Commute Time

Quiz: 22. Commute an Hour

Quiz: 23. Find Bin Width

Quiz: 24. Analyze Histogram

Quiz: 25. Frequency and Bin Size

Quiz: 26. Positively Skewed

Quiz: 27. Distribution of What?

Quiz: 28. Thinking About Distributions

Quiz: 29. Frequency Axis

Quiz: 30. X-Axis Represent!

Quiz: 31. Skewness

positively skewed

Quiz: 32. Negatively Skewed

Quiz: 33. Normal Distribution

Quiz: 34. Table vs. Histogram

Google Spreadsheet Tutorial

Tutorial

Link to Udacians’ Facebook Friends

Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

You will work with this data in Lesson 3.

Central tendency

Quiz: Which Major?

One Number to Describe Data

Quiz: Which Number to Choose?

Quiz: Mode of Dataset

mode: most frequency

Quiz: Mode of Distribution

Quiz: Mode - Negatively Skewed Distribution

Quiz: Mode - Uniform Distribution

Quiz: More than One Mode?

Quiz: Mode of Categorical Data

Quiz: More o' Mode!

Quiz: Find the Mean

Quiz: Procedure for Finding Mean

Quiz: Iterative Procedure

Helpful Symbols

Quiz: Properties of the Mean

Quiz: Mean with Outlier

Quiz: What Can You Expect?

UNC

Quiz: Requirement for Median

Quiz: Find the Median

Quiz: Median with Outlier

Quiz: Find Median with Outlier

Measures of Center

mean median mode

Quiz: Order Measures of Center 1

Quiz: Order Measures of Center 2

Use Measures of Center to Compare

Quiz: Udacians' Facebook Friends - Mean

Quiz: Udacians' Facebook Friends - Median

Quiz: Formula for Location of Median

Quiz: Wrap Up - Measures of Center

Good Job!

Problem Set 3: Central tendency

Quiz: 1. BBC Memory Scores

Link to spreadsheet with sample memory scores: BBC Sample Scores

Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Quiz: 2. BBC Memory Scores

Quiz: 3. BBC Memory Scores

Quiz: 4. What Distribution?

Quiz: 5. What Distribution?

Quiz: 6. Normal Distribution

Quiz: 7. Positively Skewed

Quiz: 8. Mean

Quiz: 9. Median

Quiz: 10. Mode

Quiz: 11. Deal or No Deal? (Median)

Deal or No Deal?

Quiz: 12. Deal or No Deal? (Mode)

Quiz: 13. Deal or No Deal? (Number)

Quiz: 14. Deal or No Deal? (Mean vs. Median)

Quiz: 15. Deal or No Deal? (Mean)

Quiz: 16. Deal or No Deal? (Proportion)

Quiz: 17. Deal or No Deal? (Frequency)

Quiz: 18. Deal or No Deal? (Distribution)

Quiz: 19. Deal or No Deal? (Center)

Quiz: 20. NHL (Mean)

Round to the nearest hundredth (xx.xx)

National Hockey League

Quiz: 21. NHL (Mode)

Quiz: 22. NHL (Median)

Quiz: 23. Which Distributions?

Quiz: 24. Median Given Histogram

Variability

Quiz: Social Networkers' Salaries

Quiz: Should You Get an Account?

Quiz: What's the Difference?

Quiz: Quantify Spread

Quiz: Does Range Change?

Quiz: Mark Z the Outlier

Chop Off the Tails

Quiz: Where Is Q1?

quartile

Quiz: Q3 - Q1

Quiz: IQR

IQR=Q3-Q1

Quiz: What Is an Outlier?

Quiz: Define Outlier

< Q1 - 1.5 IQR
> Q3 + 1.5 IQR

Quiz: Match Boxplots

Quiz: Mean Within IQR?

Problem with IQR

Quiz: Measure Variability

Quiz: Calculate Mean

Quiz: Deviation from Mean

Quiz: Average Deviation

Quiz: Equation for Average Deviation

Quiz: Be Happy and Get Rid of Negatives

Quiz: Absolute Deviations

Quiz: Average Absolute Deviation

Quiz: Formula for Avg. Abs. Dev.

Quiz: Squared Deviations

Quiz: Sum of Squares

Quiz: Average Squared Deviation

variance

Quiz: Avg. Squared Dev. in Words

Quiz: One Dimension

Standard Deviation

square root of variance

Quiz: Calculate SD

Quiz: SD Social Networkers

Quiz: SD in Words

Quiz: Spreadsheet SD

Click here to access the data: Sample Social Networkers’ Salary

Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Click here to access the data: Sample Social Networkers’ Salary Enter your answer as a number without any special characters, including $ or commas.

Link to Sample Social Networkers’ Salary Copy and paste this data into your own spreadsheet to calculate the standard deviation.

Point of SD

Quiz: Find Values

Quiz: Sample SD

Quiz: Bessel's Correction

Standard Deviation of sample is smaller than Standard Deviation of population, so we use n-1 to estimate the Standard Deviation of population(sample Standard Deviation)

Sample Standard deviation(Standard deviation of population):
$$s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}$$
Variance:
$$\frac{\sum (x_i - \bar{x})^2}{n -1}$$
Standard deviation of sample
$$s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n}}$$

Clarifying Sample SD

Jelly Beans

Problem Set 4: Variability

Quiz: 1. Udacians' Facebook Friends (Mean)

Click here for the link to the data: Udacians’ Facebook Friends

Quiz: 2. Udacians' Facebook Friends (Avg. Dev)

Quiz: 3. Udacians' Facebook Friends (SS)

Quiz: 4. Udacians' Facebook Friends (Variance)

Quiz: 5. Udacians' Facebook Friends (Std Dev)

Quiz: 6. Udacians' Facebook Friends (mean +/- std dev)

Quiz: 7. Udacians' Facebook Friends (proportion)

Quiz: 8. Udacians' Facebook Friends (sample sd)

Quiz: 9. Class Exam

Quiz: 10. Where's Your Score? (sd = 5)

Quiz: 11. Where's Your Score? (sd = 2.5)

Quiz: 12. Where's Your Score? (sd = 10)

Quiz: 13. BBC Sample Scores (Std. Dev.)

Link to BBC Sample Scores

Quiz: 14. BBC Sample Scores (Variability)

Lessons 1-4 Review/Assessment

Quiz: I

Quiz: II

Quiz: III

Quiz: IV

Quiz: V

Quiz: VI

Quiz: VII

Quiz: VIII

Quiz: IX

Quiz: X

Quiz: XI

Quiz: XII

Quiz: XIII

Quiz: XIV

Quiz: XV

Quiz: XVI

Quiz: XVII

Quiz: XVIII

Quiz: XIX

Quiz: XX

Quiz: XXI

Quiz: XXII

Quiz: XXIII

Quiz: XXIV

Quiz: XXV

Quiz: XXVI

Quiz: XXVII

Quiz: XXVIII

Quiz: XXIX

Quiz: XXX

Quiz: XXXI

Standardizing

Quiz: Chess

USCF Distribution

Quiz: Absolute or Relative

Quiz: Relative Frequency Histogram

Quiz: Proportion Between 170 and 210

Quiz: Proportion Between 180 and 200

Quiz: More Detail

Infinitely Small

Quiz: Continuous Distribution

Theoretical Normal Distribution

Z

number of standard deviations away from the mean

Unpopular

Quiz: Katie - SDs Below

Quiz: Andy - SDs Below

Quiz: Who's More Unpopular?

Quiz: Formula for Number of SDs

Z-Score

Link to poll: How many Facebook friends do you have?
$z = \frac{x-\mu}{\sigma}$

Quiz: Negative Z-Score

Quiz: Mean of Standardized Distribution

Quiz: SD of Standardized Distribution

Standard Normal Distribution

Quiz: Convert to Z-Score

Quiz: Convert to Popularity Score

Problem Set 5: Standardizing

Quiz: 1. Which Distribution Is Which?

Quiz: 2. Z-Scores

Quiz: 3. OkCupid

Quiz: 4. Social Media

Quiz: 5. Z-Scores of Usage

Quiz: 6. Where on the Distribution?

Quiz: 7. Mean and SD

Quiz: 8. IQ 125

Quiz: 9. IQ 150

Quiz: 10. Scores

Quiz: 11. Grade on a Curve

Quiz: 12. Extreme

Quiz: 13. SD

Quiz: 14. SJSU Football

Quiz: 15. Exams

Quiz: 16. Which SD?

Quiz: 17. Closest to Mean

Quiz: 18. Farthest from Mean

Quiz: 19. True or False?

Quiz: 20. BBC - Sleep

Quiz: 21. BBC - Recognition

Quiz: 22. BBC - Temporal

Quiz: 23. BBC - What Score?

Normal Distribution

Intro to the PDF

probability density function

Quiz: Probability

Get to Know the PDF

Quiz: Probability Greater

Quiz: Probability Less

Quiz: 2 SDs Below or Above

Quiz: Proportion of Facebook Friends

Quiz: More than 262

Quiz: Between 118 and 226

Quiz: Less than 240

Z-Table

Here is a link to the z-table shown in the video:
z-table

Quiz: Using the Z-Table

Karma

Udacity forums no longer use the karma system Katie describes. However, you can still access the dataset Katie created by clicking here: Average Karma points per post.

Quiz: Average Karma Points per Post

Quiz: SD of Karma Points per Post

Quiz: Integer SDs

Quiz: Less than 5

Quiz: More than 20

Quiz: Between 10 and 16

Quiz: Top 5%

Great Job!

Link to visualize the area under the curve

Problem Set 6: Normal Distribution

Quiz: 1. Heights

Quiz: CHALLENGE 2. Heights

Quiz: 3. Houses

Quiz: 4. Houses

Quiz: 5. Houses

Quiz: 6. Houses

Quiz: 7. Greater than 108

Quiz: 8. Less than 76

Quiz: 9. Between 65 and 90

Quiz: 10. Between 80 and 95

Quiz: 11. Top 30%

Quiz: 12. Greater than 1.64

Quiz: 13. Less than -2.33

Quiz: 14. Top 40%

Quiz: 15. Meanings

Quiz: 16. 64th Percentile

Sampling Distributions

Quiz: Compare Sample Means

Quiz: Gambling in Vegas

A tetrahedral die will result in a 1, 2, 3, or 4 on each roll. If you’re curious about how this works, you can read this thread. Write your answer as a proportion.

Quiz: Tetrahedral Die

Quiz: Total Number of Samples

Quiz: Mean of Each Sample

Quiz: Mean of Sample Means

Quiz: Sampling Distribution

distribution of sample means = Sampling Distribution
Mean of each sample:
1, 1.5, 2, 2.5, 1.5, 2, 2.5, 3, 2, 2.5, 3, 3.5, 2.5, 3, 3.5, 4

Copy and paste the sample means into WolframAlpha and hit enter. Pay particular attention to the histogram showing the frequency of each mean.

Quiz: Probability Mean > or = 3

Quiz: What We Need to Compare the Means

Quiz: Calculate SDs

SE: standard deviation of all our sample means

Quiz: Relationship Between SDs

Quiz: Ratio of SDs

$$SE = \frac{ \sigma }{ \sqrt{n} }$$
$\sigma$: population standard deviation
SE: standard deviation of distribution of sample means(sampling distribution)

Quiz: SD of Sampling Distribution

The Central Limit Theorem

SE: standard error

Quiz: Roll 1 Die

NOTE: Unfortunately, the rolling die simulation we used to link to here is no longer valid. Don’t worry! You have enough information now to answer this question without it. Give it your best shot, and you’ll see how the applet works in the solution video.

An alternative simulation can be found here.

Quiz: Roll 2 Dice

Quiz: Find Standard Error

The “standard deviation of the sampling distribution” is also known as the standard error.
The mean is solved for by adding up the different outcomes (1, 2, 3, 4, 5, 6) and dividing by the number of outcomes (6), yielding a result of 3.5

Quiz: Roll 5 Dice

Quiz: Standard Error for Avg of 5 Dice

Quiz: Standard Error When n Increases

Quiz: Shape of Distribution When n Increases

Simulation Applet

Link to awesome simulation applet

M&Ms

Quiz: M&M CLT

Using Sampling Distribution

Klout

What is Klout and how does it work?

Quiz: Klout Parameters

Link to Klout data Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.” Your calculations should automatically save in Google Drive.

Quiz: Klout Sampling Distribution (Mean)

Quiz: Klout Sampling Distribution (SD)

Quiz: Sampling Distribution Shape

What Do You Get with a Good Klout Score?

Quiz: Location of Mean on Distribution

Quiz: Probability of Obtaining Mean

Quiz: Does Low Probability = Causation?

Quiz: Increase Sample Size

Quiz: Location of Mean

Quiz: Probability of Mean

Quiz: Something Fun

Problem Set 7: Sampling Distributions

Quiz: 1. Central Limit Theorem

Quiz: 2. Location of Sample Mean

Quiz: 3. Average Difference

Quiz: 4. Increase Sample Size

Quiz: 5. Standard Error

Quiz: 6. n and σ

Quiz: 7. n and x-bar

Quiz: 8. Mean of Sample Means

Quiz: 9. Standard Error

Quiz: 10. Z-Score

Quiz: 11. Probability

Quiz: 12. Mean n = 25

Quiz: 13. Standard Error

Quiz: 14. Probability

Quiz: 15. Probability Decreased

Quiz: 16. Population Distribution Shape

Quiz: 17. Sampling Distribution Shape

Quiz: 18. Mean of Sampling Distribution

Quiz: 19. SD of Sampling Distribution

Quiz: 20. Which Distribution?

Quiz: 21. Greater or Less?

Quiz: CHALLENGE 22. What Sample Size?

Final project

here

Estimation

Summary

Quiz: Mean of Treated Population

point estimate

Quiz: Population Mean vs. Sample Mean

Quiz: Percent of Sample Means

Approximate Margin of Error

margin of error: $\frac{2\sigma}{\sqrt{n}}$

Interval Estimate for Population Mean

Quiz: Confidence Interval Bounds

Quiz: Exact Z-Scores

Sampling Distribution

Quiz: 95% CI with Exact Z-Scores

Quiz: Generalize Point Estimate

Quiz: Generalize CI

Quiz: CI Range for Larger Sample Size

Quiz: CI When n = 250

Bigger Sample, Smaller CI

Quiz: Z for 98% CI

Link to z-table

Quiz: Find 98% CI

Critical Values of Z

-1.96 and 1.96 are the critical values of z for 95% confidence

Quiz: Engagement Ratio

Link to Engagement Ratio data Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.” Enter your answer as a number without any special characters, including commas.

Hypothesis Testing Song

Quiz: Point Estimate Engagement Ratio

Quiz: Standard Error

Quiz: CI Bounds

Quiz: Generalize CI

Margin of Error

The margin of error is half the width of the confidence interval.

Quiz: Rate Engagement and Learning

Link to rate your engagement and learning in this class

Results from Sample

Quiz: What Statistics?

Quiz: Sampling Distributions

Quiz: Z-Scores of Sample Means

Quiz: Probability Sample Mean Is at Least…

Quiz: What Does This Mean?

Wrap-Up

Problem Set 8: Estimation

Quiz: 2. Larger Range

Quiz: 3. Increase Sample Size

Quiz: 4. Increase Population SD

Quiz: 5. 95% CI

Quiz: 6. Critical Values 95% CI

Quiz: 7. Standard Error

Quiz: 8. Probability

Link to z-table

Write the probability as a proportion.
Hint: Theoretically, z-scores can be anything from -infinity to +infinity. What does it say about the probability if you get really high or really low z-scores?

Quiz: 9. Margin of Error

Quiz: 10. 95% CI

Quiz: 11. Interpret CI

Quiz: 12. Critical Values 99% CI

Quiz: 13. Standard Error

Quiz: 14. Probability

Quiz: 15. Margin of Error

Quiz: 16. 99% CI

Quiz: 17. Interpret CI

Hypothesis testing

Quiz: Likely or unlikely

Quiz: Likely or Unlikely

Quiz: Alpha Levels

0.05 5%
0.01 1%
0.001 0.1%

Quiz: Z-Critical Value 0.05

critical region
z-critical value

Quiz: Critical Values 0.01

Quiz: Critical Values 0.001

Critical Regions

Note that when it comes to constructing a hypothesis test, it is best to choose a significant level before you perform the test. You can report the results as significant at a certain critical level after obtaining your result, but it is important that you are not ‘fishing’ for results before you see the results in your sample. This article has some additional information about understanding significance levels and p-values in hypothesis testing.

Quiz: Significance

$\alpha$ level z-critical value
0.05 1.65
0.01 2.32
0.001 3.08
z-score significant at
3.14 p<0.001

Darts

Quiz: Z-Score

Quiz: Two-Tailed Critical Values 0.05

Quiz: Two-Tailed Test

Quiz: Two-Tailed Probability

Quiz: Two-Tailed Critical Values 0.01

Quiz: Two-Tailed Critical Values 0.001

Hypotheses

Quiz: Fail to Reject the Null

Quiz: Evidence to Reject the Null

Quiz: Mean and SD

Link to Learning and Engagement Data (use this data for quiz)

Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Link to Full Learning and Engagement Results (optional)

Quiz: Null Hypothesis

Quiz: Alternative Hypothesis

One tailed or two tailed

Quiz: Conduct Hypothesis Test

what does it mean to reject the null?

  • our sample mean falls within the critical region
  • the z-score of our sample mean is greater than the z-critical value
  • the probability of obtaining the sample mean is less than the alpha level

Quiz: Critical Values 0.05

Quiz: Z-Score of Sample Mean

Quiz: Results of Hypothesis Test

Quiz: Increase Sample Size

Quiz: Reject or Fail to Reject

Quiz: Probability of Obtaining Mean

Quiz: Decision Errors

Type 1 error: reject true H0
Type 2 error: retain false H0

Quiz: Hot Beverage

Quiz: Raining

Quiz: What Happened?

Quiz: What Happened?

Prone to Misinterpretations

To Finish This Lesson…

Hypothesis Testing

Quiz: Increase Engagement?

Problem Set 9: Hypothesis testing

Quiz: 1. True or False?

Quiz: 2. Null Hypothesis

Quiz: 3. Alternative Hypothesis

Quiz: 4. Standard Error

Quiz: 5. Z-Score

Quiz: 6. Z-Critical Value

Quiz: 7. Statistical Decision

Quiz: 8. Conclusion

Quiz: 9. Type I Error

Quiz: 10. Hypotheses

Quiz: 11. Standard Error

Quiz: 12. Z-Score

Quiz: 13. Valentine's Day

Lessons 5-9 Review/Assessment

Quiz: 1. Find z-score

Quiz: 2. Probability

Quiz: 3. Z-score furthest from mean

Quiz: 4. Find x given z-score

Quiz: 5. Proportion

Quiz: 6. Probability

Quiz: 7. Compare using distributions

Quiz: 8. Standard Normal Distribution

Quiz: 9. Probability

Quiz: 10. Z-score

Quiz: 11. Percentile

Quiz: 12. Distribution of means

Quiz: 13. Standard Error

Quiz: 14. Z-score of mean

Quiz: 15. Probability of sample mean

Quiz: 16. Unlikely

Quiz: 17. Proportion of samples

Quiz: 18. Proportion of samples

Quiz: 19. Increase n

Quiz: 20. Point estimate

Quiz: 21. 95% CI

Quiz: 22. Hypotheses

Quiz: 23. Decision

Quiz: 24. Probability of Type I error

Quiz: 25. Find sigma

t-Tests

Quiz: t-Distribution

$t = \frac{mean difference}{S}$
S: population standard deviation estimated by standard deviation of sample means

Guinness

Quiz: Degrees of Freedom

Quiz: DF - Choose n Numbers

Quiz: DF - Add to 10

Quiz: DF - Marginal Totals

DF - Sample SD

n-1 in sample standard deviation can be denoted as effctive sample size

t-Table

Link to t-Table

Quiz: One-Tailed t-Test

Quiz: Two-Tailed t-Test

Quiz: Bounds of Area

t-statistic: t critical value

Quiz: Affect t-Statistic

One-Sample t-Test

$t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}$

Quiz: Increase t

Quiz: Finches

Quiz: Finches - n and DF

Link to Finch beak width data

Quiz: Finches - Mean and s

Quiz: Finches - Find t-Statistic

Quiz: Finches - Decision

p-value: probability of getting this t-statistic

Quiz: P-Value

reject the null when the p-value is less than the $\alpha$ level

Quiz: Visualize P-Value

Quiz: Find P-Value

Link to GraphPad Remember, our sample has 8 values, and our t-statistic is 0.977.

Quiz: Rent - t-Critical Values

Quiz: Rent - t-Statistic

Quiz: Rent - Decision

Quiz: Rent - Cohen's d

standardized mean difference
Cohen’s d =
$$\frac{\bar{x} - \mu_0}{s}$$

Quiz: Rent - CI

Quiz: Rent - Find CI

Quiz: Rent - Margin of Error

Quiz: Rent - Increase n

Dependent Samples

Dependent t-test for paired samples
within-subject designs

  • two conditions
  • pre-test, post-test
  • growth over time(longitudinal study)

Quiz: Keyboards

Link to Keyboards data

Quiz: Keyboards: Point Estimate for Difference

point estimate is based on samples

Quiz: Keyboards - SD of Differences

Quiz: Keyboards - t-Statistic

Quiz: Keyboards - t-Critical Values

Quiz: Keyboards - Decision

Quiz: Keyboards - Cohen's d

Cohen’s d = difference of means / sample standard deviation estimated by samples

Quiz: Keyboards - CI for Dependent Samples

Notation for Difference

Types of Designs

repeated measures design

Effect Size

effect size=mean difference

Quiz: Everyday Meaning

Types of Effect-Size Measures

  • difference measures
    • mean difference
    • standarized difference
      Cohen’s d
  • Correlation measures
    $r^2$

Statistical Significance

Cohen's d

$d=\frac{\bar{x}-\mu}{s}$
s: standard deviation of sample means

r^2

coefficieng of determination
0-1
$$r^2 = \frac{t^2}{t^2 + df}$$
t: not the t-critical
df: degrees of freedom
0: the variables are not at all related

Quiz: Compute r^2

Report Results

APA style
t(df) = x.xx, p=.xx, direction
t(24) = -2.50, p<.05, one-tailed

Report CI Results

Report CI Results 2

APA style-CIs
confidence interval on the mean difference; 95%CI = (4,6)

Report Results Effect Size

Cohen’s d, $r^2$
d = x.xx
$r^2$ = .xx

One-Sample t-Test

formulas:
df = n-1
$SEM = \frac{s}{\sqrt{n}}$
s: sample standard deviation
$t = \frac{\bar{x} - \mu}{SEM}$
$\bar{x}$: sample mean
$\mu$: population mean
CI = $\bar{x}\pm$ margin of error
margin of error = t-critical * SEM
Cohen’s d = $\frac{\bar{x}-\mu}{s}$
$r^2 = \frac{t^2}{t^2 + df}$
t: not the t-critical

Mu

Quiz: Dependent Variable

Quiz: Treatment

Quiz: Null Hypothesis

Quiz: Alternative Hypothesis

Hypotheses

Quiz: Which-Tailed Test?

Quiz: Degrees of Freedom

Quiz: t-Critical

can be found directly via t-table

Quiz: SEM

standard error of mean
sample standard deviation / sqrt(n)

Quiz: Mean Difference

sample mean and population mean

Quiz: t-Statistic

Quiz: Critical Region

Quiz: P-Value

Quiz: Statistically Significant

Quiz: Meaningful Results

Quiz: Cohen's d

Quiz: r^2

Quiz: Margin of Error

Quiz: Compute CI

Problem Set 10: t-Tests

Quiz: 1. Normal vs. t-Distribution

Quiz: 2. Z vs. t

Quiz: 3. Vocabularies - Type of Study

Quiz: 4. Vocabularies - Independent Variable

Quiz: 5. Vocabularies - Dependent Variable

Quiz: 6. Vocabularies - Null Hypothesis

Quiz: 7. Vocabularies - Alternative Hypothesis

Quiz: 8. Vocabularies - One- or Two-Tailed?

Quiz: 9. Vocabularies - t-Critical Value

Quiz: 10. Vocabularies - Mean and SD

Quiz: 11. Vocabularies - t-Statistic

Quiz: 12. Cell Phone Law: Type of Study

Quiz: 13. Cell Phone Law: Dependent Variable

Quiz: 14. Cell Phone Law: Independent Variable

Quiz: 15. Cell Phone Law: Null Hypothesis

Quiz: 16. Cell Phone Law: Alt. Hypothesis

Quiz: 17. Cell Phone Law: t-Test

Quiz: 18. Cell Phone Law: Difference Scores

Quiz: 19. Cell Phone Law: t-Critical Value

Quiz: 20. Cell Phone Law: Standard Error

Quiz: 21. Cell Phone Law: t-Statistic

Quiz: 22. Cell Phone Law: Decision

Quiz: 23. Cell Phone Law: Cohen's d

Quiz: 24. Cell Phone Law: CI

Make sure you use the t-critical value for a two-tailed test, even if you are doing a one-tailed test. This is because you center the confidence interval around your point estimate, rather than letting one bound go to positive or negative infinity depending on the direction of your test.

t-Tests continued

Independent Samples

independent samples

  • experimental
  • observational

Standard Error

standard error =
$$\frac{s}{\sqrt{n}} = \frac{\sqrt{s^2_1 + s^2_2}}{\sqrt{n}} = \sqrt{\frac{s^2_1 + s^2_2}{n}} = \sqrt{\frac{s^2_1}{n_1} + \frac{s^2_2}{n_2}}$$
$$df = n_1 + n_2 -2$$
t-statistic = $\frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)}{SE}$

Quiz: Meal Prices

Click here to access the data: Meal prices in Gettysburg and Wilma

If you would like to perform any calculations, copy and paste the data into your own spreadsheet. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Quiz: Average Meal Price

Quiz: SD for Meal Price

Quiz: Meal Price SEM

Quiz: Meal Price t-Statistic

Quiz: Calculate t-Statistic

Quiz: t-Critical Values

Quiz: Gettysburg or Wilma?

Acne Medication

Quiz: Acne Medication t-Statistic

Quiz: Acne Medication - t-Critical Values

Quiz: Acne Medication - Decision

Who Has More Shoes?

Quiz: Mean Number of Shoes

Click here to access the data: Pairs of shoes owned by males and females

Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Quiz: Shoes - Standard Error

Quiz: Shoes - t-Statistic

Quiz: Shoes - Decision

Quiz: Shoes - 95% CI

Quiz: Shoes - Calculate CI

Quiz: Gender and Shoes

Quiz: Pooled Variance Sum of Squares

Assumes samples are approximately the same size
$$SS^2_p = \frac{SS_1 + SS_2}{df_1 +df_2}$$
SS: sum of squares
$SS^2_p$: pooled variance

Quiz: Calculate Pooled Variance

Quiz: Corrected Standard Error

standard error :
$$\sqrt{\frac{S^2_1}{n_1} + \frac{S^2_2}{n_2}}$$
corrected Standard Error:
$$\sqrt{\frac{S^2_p}{n_1} + \frac{S^2_p}{n_2}}$$

Quiz: t-Statistic

Quiz: t-Critical and Decision

Assumptions

standard error:
$$\sqrt{\frac{S^2_1}{n_1} + \frac{S^2_2}{n_2}}$$
corrected Standard Error:
$$\sqrt{\frac{S^2_p}{n_1} + \frac{S^2_p}{n_2}}$$
T-test assumption

  1. X and Y should be random samples from two different independent populations
  2. Populations are approximately normal
  3. Sample data can extimate population variances
  4. Population variances are roughly equal

Problem Set 11: t-Tests continued

Quiz: 1. t-Test

Quiz: 2. t-Test

Quiz: 3. t-Test

Quiz: 4. t-Critical Value

Quiz: 5. P-Value

Quiz: 6. P-Value

Quiz: 7. t-Statistic

Quiz: 8. True or False?

Quiz: 9. Sum of Squares

Quiz: 10. Pooled Variance

Quiz: 11. Standard Error

Quiz: 12. t-Statistic

Quiz: 13. Decision

Quiz: 14. Independent Variable

Quiz: 15. Dependent Variable

Quiz: 16. Null Hypothesis

Quiz: 17. Degrees of Freedom

Quiz: 18. t-Critical Values

Quiz: 19. t-Statistic

Quiz: 20. Decision

Quiz: 21. Cohen's d

Quiz: 22. Percent of Variability

One-way ANOVA

Quiz: Intuition

Quiz: Number of t-Tests

Quiz: Extended t-Test Numerator

grand mean

Quiz: Grand Mean

grand mean sometimes equal to mean of sample means

Quiz: Between-Group Variability

Quiz: Significantly Different Means

Quiz: Sample Variability and Significance

within-group variability: the variability of indivisual samples

ANOVA

ANOVA: analysis of variance
one-way ANOVA: one independent vaiable

Quiz: Hypotheses

Quiz: Within-Group Variability

Within-Group Variability greater, test statistics smalller

Quiz: Between-Group Variability

Between-Group Variability greater, test statistics greater

Quiz: F-Ratio

F-Ratio = Between-Group Variability / Within-Group Variability

Quiz: Visualize Statistical Outcome

Quiz: Formalize Within-Group Variability

Formula for F-Ratio

$$F = \frac{Between-Group Variability}{Within-Group Variability} = \frac{n\sum(\bar{x}_k - \bar{x}_G)^2/(k-1)}{\sum(\bar{x}_i - \bar{x}_k)^2/(N-k)} = \frac{SS_{between}/df_{between}}{SS_{within}/df_{within}} = \frac{MS_{between}}{MS_{within}}$$

Quiz: Degrees of Freedom

$$df_{total} = N-1$$
$$df_{between} + df_{within} = (k-1) + (N-k) =N-1$$

Total Variation

$$SS_{between} + SS_{within} = SS_{total} = \sum(\bar{x}_i - \bar{x}_G)^2$$

Quiz: F-Distribution

F-Distribution Shape

Quiz: Table for F-Critical

Click here if you’d like to check out the F-table!

Quiz: Sample Means and Grand Mean

Quiz: SS Between

Quiz: SS Within

Quiz: Degrees of Freedom

Quiz: Mean Squares

Quiz: F-Statistic

Quiz: F-Critical

Quiz: Decision

Problem Set 12: One-way ANOVA

Quiz: 1. Within-Group Variability

Quiz: 2. Between-Group Variability and F-Ratio

Quiz: 3. Source of Variation

Quiz: 4. Between-Group Variability

Quiz: 5. True or False?

Quiz: 6. Large F-Statistic

Quiz: 7. Degrees of Freedom

Quiz: 8. Decision

Quiz: 9. Degrees of Freedom

Quiz: 10. Decision

Quiz: 11. Null Hypothesis

Quiz: 12. Alternative Hypothesis

Quiz: 13. SS Between

Quiz: 14. SS Within

Quiz: 15. Degrees of Freedom

Quiz: 16. MS

Quiz: 17. F-Statistic

Quiz: 18. F-Critical Value

3.8853

Quiz: 19. Decision

Quiz: 20. DF Total

26

Quiz: 21. Null Hypothesis

Quiz: 22. N

28=3+24+1

Quiz: 23. Decision

Quiz: 24. SS Between

150=200-50

Quiz: 25. True or False?

True

ANOVA continued

Quiz: Cows and food

Quiz: Grand mean

Quiz: Group means

Quiz: SS between

Quiz: SS within

Quiz: Degrees of Freedom

Quiz: Mean squares

Quiz: F statistic

Quiz: F critical and decision

Quiz: Deviation from grand mean

Quiz: SS total

Quiz: Conclusion

Multiple Comparison Tests

compare all of the means with each other

Quiz: Tukeys HSD

Tukey’s Honostly Significant Difference(HSD) =
$$q^{\star} \sqrt{\frac{MS_{within}}{n}} = q^{\star} \frac{S_p}{\sqrt{n}}$$
q: Studentized Range Statistic
n: sample size
Link to Studentized Range Statistic (q) Table for alpha = 0.05
df is the degrees of freedom for within-group variability; k is the number of groups/samples in your study

Quiz: Which differences are significant

if difference between sample means greater than Tukey’s HSD, we can conclude that two sample is Honostly Significant Difference

Quiz: Cohens d for multiple comparisons

$$d = \frac{\bar{x_1} - \bar{x_2}}{S_p} = \frac{\bar{x_1} - \bar{x_2}}{\sqrt{MS_{within}}}$$

Quiz: Eta squared

propotion of total variation that is due to between-group differences(explained variation)
$$\eta^2 = \frac{SS_{between}}{SS_{total}}$$

Quiz: Calculate eta squared

Quiz: Range of eta squared

Quiz: Software output

Quiz: Missing mean differences

Quiz: Different sample sizes

Quiz: Grand mean

Quiz: SS between

$$SS_{between} = \sum n_k (\bar{x_k} - \bar{x_G})^2$$
sample mean minus grand mean

Quiz: SS within

Quiz: Degrees of freedom

Quiz: MS and F

Quiz: Proportion due to drug type

$$\eta^2 = \frac{SS_{between}}{SS_{total}}$$
$\eta^2$ propotion of the difference between tumor reduction can be explained by the different treatments

Quiz: Power

type II error: failing to reject the null when we should have

  • larger samples result in higher power
  • lower within-group variability leads to higher power
  • choosing treatments with strong effect sizes will increase power

ANOVA Assumptions and Wrap Up

$$F = \frac{Between-Group Variability}{Within-Group Variability} = \frac{n\sum(\bar{x}_k - \bar{x}_G)^2/(k-1)}{\sum(\bar{x}_i - \bar{x}_k)^2/(N-k)} = \frac{SS_{between}/df_{between}}{SS_{within}/df_{within}} = \frac{MS_{between}}{MS_{within}}$$
$$q^{\star} \sqrt{\frac{MS_{within}}{n}} = q^{\star} \frac{S_p}{\sqrt{n}}$$
$$\eta^2 = \frac{SS_{between}}{SS_{total}}$$

Problem Set 13: ANOVA continued

Quiz: 1. Decision

3.3158
retain

Quiz: 2. Decision

3.2874
reject

Quiz: 3. SS Within

SStotal - SSbetween

Quiz: 4. Symbolize SS Within

SS{within} is also called SS{error} because this is the variation that can’t be explained by the independent variable.

Quiz: 5. Degrees of Freedom

k-1
N-k

Quiz: 6. Hypotheses

Quiz: 7. Post-hoc Tests

We conduct post-hoc tests in order to determine which pair(s) of groups were significantly different, since ANOVA only tells us that at least one pair is significantly different.

Quiz: 8. Tukey's HSD

smaller than HSD, retain

Quiz: 9. Tukey's HSD

Quiz: 10. η^2

Quiz: 11. η^2 Meaning

Quiz: 12. Decision

0.05 F(1,30)-critical = 4.1709

Quiz: 13. Decision

Quiz: 14. SS Between

Quiz: 15. Normality Assumption

Quiz: 16. Homogeneity of Variance

Quiz: 17. Grand Mean

Quiz: 18. SS Between

Quiz: 19. Degrees of Freedom

Quiz: 20. MS Between

Quiz: 21. Decision

Quiz: 22. Conclusion

Quiz: 23. η^2

Quiz: 24. η^2 Meaning

Quiz: 25. Explained Proportion

Quiz: 26. Tukey's HSD

Correlation

Relationships

Quiz: The Variables x and y

Quiz: Show Relationship

Quiz: Scatterplot

Quiz: Stronger Relationship

Quiz: As x Increases

Quiz: Strength and Direction

Correlation Coefficient

Correlation Coefficient r: Pearson’s r
$$r = \frac{cov(x,y)}{S_x \cdot S_y} = \frac{cov_{x,y}}{S_x \cdot S_y}$$
$r^2$ = % of the variation in Y explained by the variation in X.
$r^2$: coefficient of determination

Quiz: Match with r

Quiz: Age in Months and Years

Quiz: Hours Asleep vs. Awake

Quiz: Create Scatterplot

Data from poll Copy and paste the data into your own spreadsheet to perform the calculations. From Google Drive (at the top of the page once you’re signed in to your Google account), click the button on the left that says “CREATE” and click “Spreadsheet.”

Quiz: Calculate r

Google Spreadsheets function to calculate r:
=PEARSON(start cell for variable x:end cell for variable x, start cell for variable y:end cell for variable y)

Quiz: Stronger

Quiz: Hypothesis Testing for ρ$\rho$: true correlation for population.

correlation between variable and population

Quiz: Testing for Significance

Quiz: CI for ρ

Quiz: Find p

GraphPad QuickCalcs Page

Quiz: Add Outlier

Add the outlier (20, 8) to the data for age and number of pets (i.e., age = 20, number of pets = 8). Calculate the new correlation coefficient.

Correlation vs. Causation

Here is a link to the original comic

Fallacies

ambigous temporal precedence
third variable problem
post hoc fallacy

Problem Set 14: Correlation

Quiz: 1. Positive Directions

Quiz: 2. Order Correlation Coefficients

Quiz: 3. Interpret Results

Quiz: 4. Unlikely Value of ρ

Quiz: 5. ρ CI

Quiz: 6. Decision Based on t-Statistic

Quiz: 7. Writing Down Dreams

0.95
Dream Data

Quiz: 8. Relationships

Quiz: 9. No Correlation

Quiz: 10. Direction of Relationship

Quiz: 11. Approximate Correlation

Quiz: 12. Approximate Correlation

Quiz: 13. Increase Sample Size

When we were doing t-tests, as the sample size increased, we could reach significance with a smaller difference between the means. That’s because increasing the sample size makes it harder to get a large difference by chance. What’s the analogous idea here?

Quiz: 14. Direction of Relationship

Quiz: 15. Estimate r

0.58

Quiz: 16. Compute r

Quiz: 17. Coefficient of Determination

Quiz: 18. Calculate p

Quiz: 19. Decision

Quiz: 20. Conclusion

Quiz: 21. Decision Based on p

Regression

Intro to Linear Regression

Airplane Flights

Quiz: Symbolize Regression Equation

Try not to get confused with the typical way that the equation for the regression line is often presented: y = mx + b. There are a variety of standard ways for symbolizing the slope and y-intercept, and in this class we’ll use a to represent the y-intercept and b to represent the slope. In general, try not to memorize equations or formulas, because this will hinder your ability to understand the same formulas when different symbols are used to symbolize the same coefficients. Instead, it’s far better to understand the format of an equation or formula so you can recognize what each symbol means.

Quiz: Guess Best Fit Line

Minimize Sum of Squares

$$b = \frac{\sum(x_i - \bar{x})(y_i - \bar{y})}{\sum(x_i - \bar{x})^2} = r(\frac{S_y}{S_x})$$
r: Pearson’s r
We have decided to symbolize the regression line by y = bx + a, where b represents the slope and a represents the y-intercept.
Since b = r(standard deviation of y-values)/(standard deviation of x-values), we can also symbolize the regression line like this:
y = r(standard deviation of y-values)/(standard deviation of x-values)x + a

Quiz: Calculate r

Quiz: Calculate Standard Deviations

Quiz: Calculate Slope

Quiz: Find y-Intercept

Quiz: What Point Does the Line Go Through?

Quiz: Calculate Means

Quiz: Calculate y-Intercept

Quiz: Travel 4000 Miles

Quiz: Additional Cost per Mile

Quiz: Cost to Travel 0 Miles

Quiz: Travel on a Budget

Quiz: Which Has More Error?

Standard Error of Estimate

Standard Error Of Estimate =
$$\frac{\sum(y - \hat{y})^2}{N - 2}$$
N: number of points

Confidence Intervals

Quiz: Hypothesis Testing for Slope

Quiz: t-Test for Slope

df = N -2
N: number of x points

R Output

Factors Affecting Linear Regression

Summary of Linear Regression

Intro to Multiple Regression

R: multiple correlation coefficient
$R^2$: propotion of variability in Y explained by out set of predictors

Quiz: Alcohol, Religiosity, & Self-Esteem

Quiz: Make Predictions

Quiz: Relationship

Quiz: Causation

Applets

Problem Set 15: Regression

Quiz: 1. Stem Cells & Vision - Slope

Quiz: 2. Stem Cells & Vision - r^2

Quiz: 3. Stem Cells & Vision - y-Intercept

Quiz: 4. Stem Cells & Vision - Regression Eqn

Quiz: 5. Stem Cells & Vision - # of Stem Cells

Quiz: 6. Stem Cells & Vision - Photoreceptors

Quiz: 7. Estimate Slope

Quiz: 8. Indicate Slope

Quiz: 9. CI for Slope

Quiz: 10. Symbols

Quiz: 11. Make Predictions

Quiz: 12. Standard Error

Quiz: 13. r^2

Quiz: 14. Definition of Slope

Quiz: 15. Definition of y-Intercept

Quiz: 16. Definition of y-Hat

Quiz: 17. Definition of Std Error of Estimate

Quiz: 18. Describe Relationship

Quiz: 19. Describe Relationship

Quiz: 20. Describe Relationship

Chi-Squared tests

Quiz: Scales of Measurement

Ratio data
Ordinal data
Interval data

If you would like some additional discussion on the scales of measurement, then take a look at this very nice little tutorial.

As you watch the tutorial, think about what properties must a measurement have for us to consider it a nominal scale or an ordinal scale, etc.

Quiz: Choose Type of Data

Non-Parametric Tests

Quiz: Mount Shasta

Quiz: Expected Frequencies

Quiz: Observed Frequency

Quiz: Hypotheses Percent

Quiz: Hypotheses Frequency

Quiz: Expected Frequencies

χ^2 Goodness-of-Fit Test

Quiz: χ^2 Statistic

successful unsuccessful
expected frequency 33 67
observed frequency 41 59

$$\chi^2 = \sum \frac{(f_o - f_e)^2}{f_e}$$
$f_o$: observed frequency
$f_e$: expected frequency

Quiz: Observed Equals Expected

Quiz: χ^2 Values

Quiz: Degrees of Freedom

Quiz: Which Has More df?

the more categories we have, the more degree of freedoms we have and the larger $\chi^2$ statistics will be. We need higher critical value to reject the null hpyothesis.

Quiz: Calculate χ^2 Statistic

Quiz: Find df

df = 1 = Number of categories - 1

Quiz: Calculate p

P value equals 0.0891
Not significant at either level

GraphPad QuickCalcs

The instructor should have said, “Calculate the one-tailed p-value.” GraphPad’s Chi-Square calculator reports the p-value as two-sided, but should be taken as the one-sided p-value we desire.

χ^2 Test for Independence

Quiz: Remember Details

Elizabeth Loftus: Eyewitness Testimony

Source: Loftus, E.F. & Palmer, J.C. (1974). Reconstruction of automobile destruction: An example of the interaction between language and memory. Journal of Verbal Learning and Verbal Behavior. 13, 585-589.

Quiz: Broken Glass

Hit Smashed Control Total
Yes 7 16 6 29
No 43 34 44 121
Total 50 50 50 150

Null Hypothesis: Student’s response for whether or not they saw broken glass is independent of the wording used in question
Expected frequencies:
For (Yes, Hit) is (29/150) * 50
For (No, Hit) is (121/150) * 50

Quiz: Expected Frequencies

Quiz: Calculate χ^2 Statistic

Quiz: Degrees of Freedom

df = 2 = (number of rows - 1)(number of columns - 1)

Quiz: Decision

GraphPad QuickCalcs
Chi-Square Table

Quiz: Effect Size

Chi-square Test for Independence
$$Cramer’s V (\phi_c) = \sqrt{\frac{\chi^2}{n(k - 1)}}$$
k: smaller of number of rows or columns (2)
n: total number (150)

Quiz: Calculate Cramér's V

Assumptions and Restrictions

Avoid dependent observations
Avoid small expected frequencies (large n)

Summary

Congrats

Problem Set 16: Chi-Squared tests

Quiz: 1. Dependent Variable

Ranking

Quiz: 2. Scale of Measurement

Ordinal

Quiz: 3. Dependent Variable

help

Quiz: 4. Scale of Measurement

Nominal

Quiz: 5. Dependent Variable

time

Quiz: 6. Scale of Measurement

ratio

Quiz: 7. Dependent Variable

error

Quiz: 8. Scale of Measurement

ratio

Quiz: 9. Specify Level of Measurement

Quiz: 10. Select χ^2 Test

Quiz: 11. Null Hypothesis

not

Quiz: 12. Which χ^2 Test?

outcome frequencies expected frequencies
1 8 4
2 4 4
3 1 4
4 8 4
5 3 4
6 0 4

good nominal

Quiz: 13. Degrees of Freedom

5

Quiz: 14. χ^2 Critical Value

Quiz: 15. Calculate χ^2 Statistic

Quiz: 16. Decision

Quiz: 17. Conclusion

Quiz: 18. Null Hypothesis

Cabin Steerage Total
Yes 299 186 485
No 280 526 806
Total 579 712 1291

independent

Quiz: 19. Which χ^2 Test?

Indenpence nominal

Quiz: 20. Degrees of Freedom

1

Quiz: 21. χ^2 Critical Value

Quiz: 22. Calculate χ^2

Quiz: 23. Decision

Quiz: 24. Conclusion

Lessons 10-16 Review/Assessment

Quiz: 1

Quiz: 2

Quiz: 3

Quiz: 4

Quiz: 5

Quiz: 6

Quiz: 7

0.3/15

Quiz: 8

120*0.02+5.24

Quiz: 9

Quiz: 10

Quiz: 11

Quiz: 12

Quiz: 13

Quiz: 14

Quiz: 15

Quiz: 16

Quiz: 17

Quiz: 18

Quiz: 19

Quiz: 20

Quiz: 21

Quiz: 22

Quiz: 23

Quiz: 24

Quiz: 25

Quiz: 26

Quiz: 27

Quiz: 28

Quiz: 29

Quiz: 30

Final Project

Final project details can be found [here](https://www.udacity.com/wiki/ud201/final_project.

Here are helpful tips and suggestions as you work on your final project!